/*
 * @Descripttion: 
 * @version: 
 * @Author: TT
 * @Date: 2021-10-03 11:45:49
 * @LastEditors: TT
 * @LastEditTime: 2022-08-30 14:47:42
 */

// 通用 字体
import 'package:flutter/material.dart';

class TextStyleMacor {
  static TextStyle fontRegular(double size, Color color, {double? height}) {
    return TextStyle(
      fontSize: size,
      fontWeight: FontWeight.w400,
      color: color,
      height: height,
    );
  }

  static TextStyle fontMedium(double size, Color color, {double? height}) {
    return TextStyle(
      fontSize: size,
      fontWeight: FontWeight.w500,
      color: color,
      height: height,
    );
  }

  static TextStyle fontSemi(double size, Color color, {double? height}) {
    return TextStyle(
      fontSize: size,
      fontWeight: FontWeight.w600,
      color: color,
      height: height,
    );
  }

  static TextStyle fontLight(double size, Color color, {double? height}) {
    return TextStyle(
      fontSize: size,
      fontWeight: FontWeight.w300,
      color: color,
      height: height,
    );
  }

  static TextStyle fontBold(double size, Color color, {double? height}) {
    return TextStyle(
      fontSize: size,
      fontWeight: FontWeight.bold,
      color: color,
      height: height,
    );
  }

  // 设置字体
  static TextStyle configtextstyle(
    double fontsiz,
    Color color, {
    FontWeight font = FontWeight.normal,
  }) {
    return TextStyle(
      fontSize: fontsiz,
      color: color,
      fontWeight: font,
      fontFamily: 'SourceHanSans',
    );
  }
}
